#ifndef _UTILITY_H_
#define _UTILITY_H_

#include "SDL.h"
#include <string>
#include "pd_types.h"

std::string format_path( std::string path );

SDL_Surface* load_image( std::string filename, bool alphaFormat );

void apply_surface( Uint32 x, Uint32 y, SDL_Surface* source, SDL_Surface* destination );
void apply_partial_surface( Sint16 srcX, Sint16 srcY, Uint16 srcW, Uint16 srcH, Sint16 dstX, Sint16 dstY, SDL_Surface* source, SDL_Surface* destination );
double rand_double_range(double a, double b);

void log_error( std::string error );

void log_info( std::string info );

//Get opposite side as passed in
PlayerSide get_opposite_side(PlayerSide side);

Uint16 get_d10_roll();

#endif